class MessageInfo:

    # self=this
    def send_email(self, to_email):
        msg = "给{}的{}发送一个邮件".format(self.name, to_email)
        print(msg)

    def send_dingding(self, to_email):
        msg = "给{}发送一个钉钉".format(to_email)
        print(msg)


# 创建一个MessageInfo类的对象； 实例化了MessageInfo类的对象。
obj1 = MessageInfo()
obj2 = MessageInfo()

obj1.name = "青海"
print(obj1.name)
obj2.name = "江西"
print(obj2.name)

obj1.send_email("x1")
obj2.send_email("xx")
